/**
 * Created by DELL on 2017/6/23.
 */
(function () {
    var agentId=common.getQueryString("agentId");
    $("#agentId").val(agentId);
    var settings = {
        "sAjaxSource": window.globalHost + common.agentCreditRecordListPath ,
        "aoColumns": [
            {
                "mDataProp": function(obj) {
                    return (obj.agentName===""?"无信息":obj.agentName)+"&nbsp; / &nbsp;"+obj.mobile;
                },
                "sTitle": "经纪人",
                "sDefaultContent": "",
                "sClass": "center"
            },{
                "mDataProp": function(obj) {
                    return enumObject.enumJsonData["pointType"][obj.pointType];
                },
                "sTitle": "积分增减类型",
                "sDefaultContent": ""
            },{
                "mDataProp": function(obj) {
                    return obj.point>=0?"+" + obj.point:obj.point;
                },
                "sTitle": "积分",
                "sDefaultContent": ""
            },{
                "mDataProp": "createTime",
                "sTitle": "生成时间",
                "sDefaultContent": ""
            },{
                "mDataProp": "remainPoint",
                "sTitle": "积分余额",
                "sDefaultContent": ""
            }],
        "fnServerParams": function(aoData) {
            return common.getSearchData("form.data-list-search",aoData);
        }
    };
    var options = $.extend(true, {}, _dataTableSettings, settings);
    /**
     * 实例化 中介联系人 列表插件
     * @type {[type]}
     */
    var $currentDataTable=$("#data-list");
    var oTable = $currentDataTable.dataTable(options);
    searchList.getDataList(oTable);
    searchList.resetSearch(oTable);
}).call(this);
